//
//  CoverViewController.swift
//  MyTest
//
//  Created by guanzhongwang on 2021/5/7.
//

import UIKit

class CoverViewController: CommonViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        let vc = UIStoryboard(name: "LaunchScreen", bundle: nil)
            .instantiateInitialViewController()
        addChild(vc!)
        view.addSubview(vc!.view)
        let tgr = UITapGestureRecognizer.init(target: self, action: #selector(click))
        vc!.view.addGestureRecognizer(tgr)
        title = "头条封面"
    }
    @objc func click(){
        self.navigationController?.navigationBar.isHidden = !(self.navigationController?.navigationBar.isHidden)!
    }
    override func viewWillAppear(_ animated: Bool) {
        self.navigationController?.navigationBar.isHidden = true
    }
    override func viewWillDisappear(_ animated: Bool) {
        self.navigationController?.navigationBar.isHidden = false
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
